ci(release): stage the back-merge branch instead of opening the PR - #126
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the same treatment as #125 to the post-release back-merge: stage the branch, hand the maintainer a prefilled link, do not open the PR.
Changes
gh pr createis removed. On a published release the workflow now pushesbackmerge/main-to-develop-<run_id>at main's tip and writes a job summary containing a fully prefilled "open the PR" link — basedevelop, head the new branch, title and body both filled in.permissionsdrops tocontents: write, and theGH_TOKENenv goes away — nothing calls the API any more.Why not open it here
Same reason as the release PR: a PR opened by
github-actions[bot]with the defaultGITHUB_TOKENdoes not triggerpull_requestworkflows. CI, Integration Tests, and Commit Lint gatedevelop, so a bot-opened back-merge would land unverified.One deliberate difference from prepare-release
prepare-release commits its PR body to
.github/release-pr/<tag>.md, because that body embeds the version's changelog section and is far too long for a URL query string.The back-merge body is a single boilerplate sentence, so it fits in the URL and is prefilled directly. Nothing to copy, and no file accumulating in the repo for what is pure bookkeeping. The header comment records that reasoning so the two workflows do not get "unified" later without cause.
Also: a no-op guard
The old workflow pushed a branch and attempted a PR unconditionally. If
developalready contained every commit onmain— the normal outcome when the release PR was a fast-forward promotion — that produced a branch with an empty diff and a failedgh pr create.It now checks first and, when there is nothing to back-merge, pushes no branch and says so in the summary. As of today
git rev-list --count origin/develop..origin/mainis0, so this is the live case, not a hypothetical.🤖 Generated with Claude Code